#include<iostream>
#include<string>
using namespace std;
string s, t;
int main()
{
	while (cin >> s >> t) {
		int ans = 0;
		int pos = s.find(t);
		//cout << "pos==" << pos << endl;
		while (pos != -1) {
			ans++;
			s.erase(pos, t.size());
			pos = s.find(t);
		}
		cout << ans << endl;
	}
	return 0;
}